<template>
  <table>
    <thead>
      <tr>
        <th>ID</th>
        <th>项目</th>
        <th>站点</th>
        <th>分类1</th>
        <th>分类2</th>
        <th>分类3</th>
        <th>条码</th>
        <th>描述</th>
        <th>单位</th>
        <th>库存</th>
        <th>锁定</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="stock in stocks" :key="stock.id">
        <td>{{ stock.id }}</td>
        <td>{{ stock.projectCode }}</td>
        <td>{{ stock.siteInfo }}</td>
        <td>{{ stock.cat00 }}</td>
        <td>{{ stock.cat01 }}</td>
        <td>{{ stock.cat02 }}</td>
        <td>{{ stock.itemBarcode }}</td>
        <td>{{ stock.itemDesc }}</td>
        <td>{{ stock.uom }}</td>
        <td>{{ stock.stockQty }}</td>
        <td>{{ stock.holdQty }}</td>
        <td>
          <button @click="$emit('mark-usage', { id: stock.id })">出库</button>
        </td>
      </tr>
    </tbody>
  </table>
</template>
<script setup lang="ts">
import { defineProps } from 'vue';
const props = defineProps<{ stocks: any[] }>();
</script> 